package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import util.core.WrapController;

/**
 * Created by WhiteBlue on 15/6/17.
 */
@Controller
@RequestMapping(value = "/")
public class DemoController extends WrapController {

    @RequestMapping(value = "", method = RequestMethod.GET)
    public Object index(@RequestParam(value = "msg", required = false, defaultValue = "poi~") String content) {
        clearAttr();// 清除之前的attr和view,也可以无视
        this.setAttr("msg", content);
        return this.render("/index.html");
    }


}
